// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   SourceFile

package com.sgame.android.lang;

import java.io.*;

public class SurrogateSerializableThrowable extends Throwable
{

    protected SurrogateSerializableThrowable()
    {
    }

    public SurrogateSerializableThrowable(Throwable throwable)
    {
        super(throwable.getMessage());
        if((throwable = throwable.getCause()) != null)
        {
            if(!isSerializable(throwable))
            {
                initCause(new SurrogateSerializableThrowable(throwable));
                return;
            }
            initCause(throwable);
        }
    }

    static boolean isSerializable(Throwable throwable)
    {
        Object obj = new ByteArrayOutputStream();
        try
        {
			obj = new ObjectOutputStream(((java.io.OutputStream) (obj)));
        	((ObjectOutputStream) (obj)).writeObject(throwable);
        	return true;
        }
        catch(IOException ex)
        {
        	
        }
        return false;
    }

    private static final long serialVersionUID = 1L;
}
